package syntaxTree.classDecl;

import syntaxTree.id.*;
import syntaxTree.varDecl.*;
import syntaxTree.methodDecl.*;

public class classDeclExtends extends classDecl{		// -> class id extends id{varDecl* MethodDecl*}
	id id1;
	id id2;
	varDecl var;
	methodDecl met;
	public classDeclExtends(id id1,id id2, varDecl var, methodDecl met)
	{
		this.cd = new classDeclInit();
		this.id1 = id1;
		this.id2 = id2;
		this.var = var;
		this.met = met;
	}
	public classDeclExtends(id id1,id id2, varDecl var)
	{
		this.cd = new classDeclInit();
		this.id1 = id1;
		this.id2 = id2;
		this.var = var;
		this.met = new methodDeclInit();
	}
	public classDeclExtends(id id1,id id2, methodDecl met)
	{
		this.cd = new classDeclInit();
		this.id1 = id1;
		this.id2 = id2;
		this.var = new varInit();
		this.met = met;
	}
	public classDeclExtends(id id1,id id2)
	{
		this.cd = new classDeclInit();
		this.id1 = id1;
		this.id2 = id2;
		this.var = new varInit();
		this.met = new methodDeclInit();
	}
	public classDeclExtends(classDecl cd, id id1,id id2, varDecl var, methodDecl met)
	{
		this.cd = cd;
		this.id1 = id1;
		this.id2 = id2;
		this.var = var;
		this.met = met;
	}
	public classDeclExtends(classDecl cd, id id1,id id2, varDecl var)
	{
		this.cd = cd;
		this.id1 = id1;
		this.id2 = id2;
		this.var = var;
		this.met = new methodDeclInit();
	}
	public classDeclExtends(classDecl cd, id id1,id id2, methodDecl met)
	{
		this.cd = cd;
		this.id1 = id1;
		this.id2 = id2;
		this.var = new varInit();
		this.met = met;
	}
	public classDeclExtends(classDecl cd, id id1,id id2)
	{
		this.cd = cd;
		this.id1 = id1;
		this.id2 = id2;
		this.var = new varInit();
		this.met = new methodDeclInit();
	}
	public String toString()
	{
		return ("class "+id1.toString()+" extends "+id2.toString()+" { "+var.toString()+' '+met.toString()+" }\n");
	}
	public String toC()
	{
		return ("class "+id1.toC()+" extends "+id2.toC()+" { "+var.toC()+' '+met.toC()+" }\n");
	}
}
